/*
 *  Created on: Aug 18, 2009
 *      Author: Ramesh Rajaby
 */

#include "FileWritingUtils.h"


void writeStringOnFile(ofstream& out, string s) {
	int len = s.length();

	out.write((char*)&len, sizeof(len));
	out.write(s.c_str(), len);
}

void writeIntOnFile(ofstream& out, int i) {
	out.write((char*)&i, sizeof(i));
}

void writeShortOnFile(ofstream& out, short i) {
	out.write((char*)&i, sizeof(i));
}
